<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="vue.js"></script>
</head>
<body>
    <div id="app">
        <!-- v-bind可简化(:title) -->
        <h2 v-bind:title="message">{{message}}</h2>
        <p :title="msg">{{msg}}</p><br>
        <!-- v-on简化为@ -->
        <button v-on:click="print1">打印1</button><br>
        <button @click="print2">打印2</button>
    </div>
    <script>
        const app=Vue.createApp({
            data(){
                return{
                    message:"hello,vue",
                    msg:666
                }
            },
            methods: {
                print1(){
                    console.log("111")
                },
                print2(){
                    console.log("222")
                }
            }
        })
        app.mount("#app")
    </script>
    
</body>
</html>